<%-- 
    Document   : productMain2
    Created on : Mar 24, 2012, 8:50:34 PM
    Author     : theworldiwant
--%>
<%@page import="entities.ProductCategories"%>
<%@page import="java.util.LinkedList"%>
<%@page import="java.util.LinkedList"%>
<%@page import="dao.ProductCatDAO"%>
<%@page import="dao.ProductCatDAO"%>
<%@page import="dao.DAOFactory"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@page import="entities.User"%>
<%
            User myUser = (User) session.getAttribute("user");
            if (myUser ==null){
                response.sendRedirect("http://localhost:8080/WEBDEVES17_1/productMain.jsp");
                return;
            }
%>
<!DOCTYPE html>
<html xmlns ="http://www.w3.org/1999/xhtml">
    <head>
        <title>The BookShelf</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link href ="productMain2.css" rel ="stylesheet" type ="text/css" />
     <script>
            function show(b){
                if(b==true)
                    document.getElementById("hidden").style.visibility="visible";
                else
                    document.getElementById("hidden").style.visibility="hidden";
                    
            }
            
        </script>
    </head>
    <body>
        <div id="wrapper" class ="wrapper">
            <div id="inner" class="innerMain">
                <div id="header" class="header">
                      <img class="bg" src ="images/logoBg.png"></img>
                      <img class ="logo" src ="images/logo2.png"></img>
                      <form class="nothing" name="SearchForm" action="Search" method="GET"> 
                            <input class="searchBox" name="keyword" value="" class ="text" type="text"/> 
                            <input class="magnify" src="images/search.png" type="image" onclick=""/>
                      </form>
                        <div id="nav" class="nav">
                          <a class="link" href="">My Cart</a>
                          <a class="link" href="">Explore</a>
                            &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
                          <a class="link" href="">Recommendations</a>
                          <a class="link" href="">My Account</a>
                          <a class="link" href="">Log Out</a>
                          <input type="image" onmouseover="show(true)" class="explore"  src="images/explore.png"/>
                         
                     </div>
                </div>
                 <div class="hidden" id="hidden" onmouseover="show(true)" onmouseout="show(false)">
                         <img src="images/hiddenPanel.png" class="hiddenP"/>
                         <a href=""><img class="explore2" src="images/explore.png"/>
                         </a>
                         <div class="hiddenExp" id="hiddenExp">
                            <a class="link" href="http://www.we.com">Best Sellers</a>
                            
                            <a class="link" href="http://www.we.com">New Products</a>
                            <a class="link" href="http://www.we.com">Recent Searches</a>
                        </div>
                     </div>
                <div id="top" class="top">
                     <div class="inner">
                         <img src="images/topShelf2.png" class="topShelf"/>
                         <div class="top1">
                            <h3>Star Wars Trilogy (Widescreen Edition)</h3>
                            <img src="images/photo_1.jpg" alt="photo 1" title="Star Wars" class="no1" height="120" width="120" />
                         </div>
                         <div class="top2">
                                <h3>Batman - The Animated Series </h3>
                                <img title ="Batman" src="images/photo_4.jpg" alt="photo 4" class="left" height="120" width="120" />

                         </div>
                         <div class="top3">
                                <h3>Harry Potter and the Prisoner of Azkaban </h3>
                                <img src="images/photo_2.jpg" alt="photo 2" class="left" height="120" width="120"/>

                         </div>
                        <div class="top4">
                                <h3>The Matrix Reloaded (Full Screen Edition)</h3>
                                <img title="Matrix" src="images/photo_6.jpg" alt="photo 6" class="left" height="120" width="120" />

                         </div>
                         
                        <div class="top5">
                                <h3>The Matrix Reloaded 2(Full Screen Edition)</h3>
                                <img title="Matrix2" src="images/photo_6.jpg" alt="photo 6" class="left" height="120" width="120" />

                         </div>
                     
                     </div>
                </div><!--end of body-->
                <!--end of header-->
                
               
               
                <div id="newuserform" class="newuserform">
                    <div id="" class="newuser"><img class="newuserbg" src="images/newuser.png" /></div>
                    <input src="images/signup.png" type="image" onclick="" class="signup"/>     
                    
                    <form name="SignUpForm" class="nothing2"action="SignUp" method="POST" class="SearchForm">
                        <h4 class="usernew">Username</h4>
                        <input class="newusername"  name="newusername" value="" type="text"/>
                        <h4 class="passnew">Password</h4>
                        <input  class="newpass" name="newpass" value="" type="password"/>
                        
                        <h4 class="bdate">Birthday<br>(Y/MM/DD)</h4>
                        
                        <input class="bdatenew" name="bdate" value="" type="text"/>
                        <h4 class="gendernew">Gender</h4>
                        
                        <select class="newgender"><option>M</option><option>F</option></select><h4 class="locationnew">Location</h4>
                        <input class="newlocation" name="newlocation" value=""  type="text"/>
                
                    </form>
                </div>
                <div id ="genre" class ="genre">
                    <img src="images/genre.png"/>
                    <dl id="browse" class="browseDiv">
                        <dt><h3 class="genreH3">Genre</h3></dt>
                            <%
                        DAOFactory myDAOFactory = DAOFactory.getInstance(DAOFactory.MYSQL);
                        ProductCatDAO c1 = myDAOFactory.createProdCatDAO();
                        LinkedList<ProductCategories> list=c1.arrangeAlp();
                        for(ProductCategories pc: list){
            
                        %>
                            <dd><a href="#"><%out.print(pc.getName());%></a></dd>
                       <%}%>   
                    </dl>
                </div>
                <div id="body" class="bodyDiv">
                     <img class="prodBook" title="Matrix2" class="img"src="images/photo_6.jpg" alt="photo 6" height="170" width="150" />
                     <div class="contentTitle">
                         Title
                         <a href="#" class="seriesLink">(Series # SeriesName)</a>
                     </div>
                     <div class="contentAuthor">
                         by 
                         <a href="#" class="authorLink">Author</a>
                     </div>
                     <div class="signAdd">Sign in <br> to add to cart</div>
                     <div class="content">
                         <div class="price"> Price: </div>
                         <div class="popularity"> Popularity: </div>
                         <div class="stock"> Stock: </div>
                         <div class="lastSearched"> Last Searched: </div>
                         <div class="desc">
                         Description: <br><br>
                         IF THE LOVE OF YOUR LIFE DIED, WHAT WOULD YOU MISS THE MOST? 

HIS VOICE? 
HIS TOUCH? 
HIS HEART BEATING AGAINST YOURS? 

When Ivy's boyfriend Tristan dies, she's desolate without him, until she discovers Tristan hasn't abandoned her - he's her guardian angel, watching over her, close enough to hear, to see, to touch... 

But Ivy's life is in danger. If Tristan rescues her, his mission on earth will be over and he'll have to leave her behind. 
Will Ivy lose Tristan forever?
                         </div>
                         
                         <div>
                             <br><br>
                             Tags: 
                             <a class="tags" href="#">mememem</a>
                         </div>
                         
                     </div>
                     <div class="rec">
                         <br> 
                         Recommended Books...
                     </div>
                    <div class="recShelf">
                             <img src="images/recShelf.png"/>
                             
                             <div class="rec1">
                                <h3>The Matrix Reloaded 2(Full Screen Edition)</h3>
                                <img title="Matrix2" src="images/photo_6.jpg" alt="photo 6" class="left" height="120" width="120" />
                            </div>
                             
                             <div class="rec2">
                                <h3>The Matrix Reloaded 2(Full Screen Edition)</h3>
                                <img title="Matrix2" src="images/photo_6.jpg" alt="photo 6" class="left" height="120" width="120" />
                            </div>
                             
                             <div class="rec3">
                                <h3>The Matrix Reloaded 2(Full Screen Edition)</h3>
                                <img title="Matrix2" src="images/photo_6.jpg" alt="photo 6" class="left" height="120" width="120" />
                            </div>
                             
                             <div class="rec4">
                                <h3>The Matrix Reloaded 2(Full Screen Edition)</h3>
                                <img title="Matrix2" src="images/photo_6.jpg" alt="photo 6" class="left" height="120" width="120" />
                            </div>
                    </div>
                </div>
             
               
       </div><!--end of inner-->
        <div id="credits" class="credits">
                    <img src="images/credits.png"/>
                </div>           
       </div>
    </body>
</html>
